package server.orders;

import java.util.Arrays;
import java.util.List;

import server.database.AbstractTable;
import server.database.DatabaseColumn;
import server.database.IDatabaseTable;

public class OrdersTable extends AbstractTable
{
	public static final String TABLE_NAME = "Orders";

	public static final DatabaseColumn ID = new DatabaseColumn(IDatabaseTable.ID, INTEGER, Arrays.asList(AUTO_INCREMENT));
	public static final DatabaseColumn CUSTOMER_ID = new DatabaseColumn("customer_id", INTEGER, Arrays.asList(NOT_NULL));
	public static final DatabaseColumn SALESMAN_ID = new DatabaseColumn("salesman_id", INTEGER, Arrays.asList(NOT_NULL));
	public static final DatabaseColumn OPEN_DATE = new DatabaseColumn("open_date", DATE, Arrays.asList(NOT_NULL));
	public static final DatabaseColumn STATUS = new DatabaseColumn("status", INTEGER, Arrays.asList(NOT_NULL));
	public static final DatabaseColumn STATUS_DATE = new DatabaseColumn("status_date", DATE, Arrays.asList(NOT_NULL));

	public final List<DatabaseColumn> m_lstColumns = Arrays.asList(ID, CUSTOMER_ID, SALESMAN_ID, OPEN_DATE, STATUS, STATUS_DATE);
	public final List<DatabaseColumn> m_lstKey = Arrays.asList(ID);

	@Override
	public String getTableName()
	{
		return TABLE_NAME;
	}

	@Override
	public List<DatabaseColumn> getColumns()
	{
		return m_lstColumns;
	}

	@Override
	public List<DatabaseColumn> getPrimaryKey()
	{
		return m_lstKey;
	}

}
